//
//  HHSemiPresentAnimator.h
//  Pod
//
//  Created by Basic on 2017/3/23.
//  Copyright © 2017年 green. All rights reserved.
//  半屏VC present 转场动画 实现

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@class HHSemiPresentAnimator;
@protocol HHSemiPresentAnimatorFromDelegate <NSObject>
@optional

/**
 转场动画过程中，from vc 截图

 @param animator animator description
 @return return value description
 */
- (UIImage *)HHSemiPresentAnimatorFromGetShotImg:(HHSemiPresentAnimator *)animator;
@end

@protocol HHSemiPresentAnimatorToDelegate <NSObject>
@optional

/**
 转场动画过程中，from vc 的截图完成（作为to page的背景图）

 @param animator animator description
 @param shotImg shotImg description
 */
- (void)HHSemiPresentAnimatorTo:(HHSemiPresentAnimator *)animator didShotImg:(UIImage *)shotImg;

/**
 转场动画 will present
 
 @param animator animator description
 */
- (void )HHSemiPresentAnimatorToWillPresent:(HHSemiPresentAnimator *)animator;
/**
 转场动画 present ing

 @param animator animator description
 */
- (void )HHSemiPresentAnimatorToPresenting:(HHSemiPresentAnimator *)animator;

/**
 转场动画 will dismiss
 
 @param animator animator description
 */
- (void )HHSemiPresentAnimatorToWillDismiss:(HHSemiPresentAnimator *)animator;
/**
 转场动画 dismiss ing
 
 @param animator animator description
 */
- (void )HHSemiPresentAnimatorToDismissing:(HHSemiPresentAnimator *)animator;

/**
 转场动画过程完成
 
 @param animator animator description
 */
- (void )HHSemiPresentAnimatorToCompletion:(HHSemiPresentAnimator *)animator;
@end

@interface HHSemiPresentAnimator : NSObject <UIViewControllerTransitioningDelegate, UIViewControllerAnimatedTransitioning>
@property (weak, nonatomic) id<HHSemiPresentAnimatorFromDelegate>      fromDelegate;
@property (weak, nonatomic) id<HHSemiPresentAnimatorToDelegate>        toDelegate;
@end
